<? if(!defined('IN_TIPASK')) exit('Access Denied'); include template('header'); ?>
<link href="<?=SITE_URL?>../css/share/index.css" rel="stylesheet" type="text/css">
<div class="box">
    <!--内容左一栏 begin-->
    <div class="boxone">
        <div class="boxone1">
            <div class="boxtop"><?=$user['username']?></div>
            <div class="boxone1down1">
                <h1><?=$setting['list_bestadopt']?></h1>
                <? $statistics=$this->fromcache('statistics'); ?>                <p class="boxone1down2">已解决问题数：<?=$statistics['solves']?></p>
                <p class="boxone1down3">待解决问题数：<?=$statistics['nosolves']?></p>
            </div>
        </div>
        <div class="blank10"></div>
        <div class="boxone1">
            <div class="boxtop">问答分类</div>
            <div class="boxone1down4 ">
            	 <? $categorylist=$this->fromcache('categorylist'); ?>                
<? if(is_array($categorylist)) { foreach($categorylist as $category1) { ?>
                <h2><a href="<?=SITE_URL?>?c-<?=$category1['id']?>.html"><?=$category1['name']?></a><span>(<?=$category1['questions']?>)</span></h2>
                <ul>
                    
<? if(is_array($category1['sublist'])) { foreach($category1['sublist'] as $index => $category2) { ?>
                    <li><a href="<?=SITE_URL?>?c-<?=$category2['id']?>.html"><?=$category2['name']?><span>(<?=$category2['questions']?>)</span></a></li>
                    
<? } } ?>
                </ul>
                
<? } } ?>
            </div>
        </div>
        <div class="blank10"></div>

        <div class="boxone3">
            <div class="boxone3anxian1">
                <a href="mailto:<?=$setting['admin_email']?>" target="_blank" ><strong>意见反馈</strong></a>
            </div>
            <div class="boxone3anxian2">
                <a href="<?=SITE_URL?>?index/help.html#如何提问" target="_blank" ><strong>如何提问</strong></a>
            </div>
            <div class="boxone3anxian3">
                <a href="<?=SITE_URL?>?index/help.html#如何回答" target="_blank" ><strong>如何回答</strong></a>
            </div>
        </div>
    </div>

    <!--内容左二栏 begin-->
    <div class="boxtwo">
        <div class="boxtwo1">
            <div class="boxtop">
                <span><a href="<?=SITE_URL?>?r-1.html" target="_blank">更多&gt;&gt;</a></span>精彩推荐
            </div>
            <div class="boxtwo1down">
                <div class="boxtwo1downright blue">
                    <ul>
                    <? $recommendlist=$this->fromcache('recommendlist'); ?>                        
<? if(is_array($recommendlist)) { foreach($recommendlist as $index => $recommend) { ?>
                        <li id="recommend<?=$index?>">
                            <span class="font_gray3">[<a href="<?=SITE_URL?>?c-<?=$recommend['cid']?>.html" target="_blank"><?=$recommend['category_name']?></a>]</span>
                            <a href="<?=$recommend['url']?>" title="<?=$recommend['title']?>" target="_blank"><? echo cutstr($recommend['title'],22); ?></a>
                        </li>
                        
<? } } ?>
                    </ul>
                </div>
                <div style class="boxtwo1downleft">
                
<? if(is_array($recommendlist)) { foreach($recommendlist as $index => $recommend) { if(0==$index) { ?>                    	<a  id="recommend<?=$index?>img" href="<?=SITE_URL?>?q-<?=$recommend['qid']?>.html" target="_blank"><img height="106" width="160" src="<?=$recommend['image']?>"></a>
                    <? } else { ?>                    	<a 	id="recommend<?=$index?>img" href="<?=SITE_URL?>?q-<?=$recommend['qid']?>.html" target="_blank" style="display:none"><img height="106" width="160" src="<?=$recommend['image']?>"></a>
                    <? } } } ?>
                </div>
            </div>
        </div>

        <div class="blank10"></div>

        <div class="boxtwo1">
            <div class="boxtop blue"><span><a href="<?=SITE_URL?>?l-1.html">更多&gt;&gt;</a></span>同学正在问</div>
            <div class="boxtwo3down blue">
                <ul>
                <? $nosolvelist=$this->fromcache('nosolvelist'); ?>                    
<? if(is_array($nosolvelist)) { foreach($nosolvelist as $index => $question) { ?>
            <? ++$index; ?>                    <li><span>[<a href="<?=SITE_URL?>?c-<?=$question['cid']?>.html"><?=$question['category_name']?></a>]</span>·<a href="<?=$question['url']?>" target="_blank"><?=$question['title']?></a></li>
                    <? if(0==$index%5) { ?>                    <li class="boxtwo3downline"></li>
                    <? } ?>                    
<? } } ?>
                </ul>
            </div>
        </div>
        <div class="blank10">
        </div>
        <div class="boxtwo1">
            <div class="boxtop blue"><span><a href="<?=SITE_URL?>?l-4.html">更多&gt;&gt;</a></span>掉RP求答案</div>
            <div class="boxtwo3down blue">
                <ul>
                <? $rewardlist=$this->fromcache('rewardlist'); ?>                    
<? if(is_array($rewardlist)) { foreach($rewardlist as $question) { ?>
                    <li>
                        <span>[<a href="<?=SITE_URL?>?c-<?=$question['cid']?>.html"><?=$question['category_name']?></a>]</span>
                        <div class="boxtwo3downleft"><?=$question['price']?></div>
                        <a href="<?=$question['url']?>" target="_blank"><?=$question['title']?></a>
                    </li>
                    
<? } } ?>
                </ul>
            </div>
        </div>
    </div>
 
    <div class="boxthree">
        <? if(!$user['uid']) { ?>        <div id="divLoginContainer">
            <div class="boxthree1">
                <a style="text-decoration: none;" target="_blank" href="<?=SITE_URL?>?user/register.html"><span class="login_btn">免费注册</span><br><span>免费注册东岳问答</span></a>
                <a target="_blank" href="<?=SITE_URL?>?user/login.html" style="text-decoration: none; margin-right: 0px;"><span class="login_btn">登 录</span><br><span>开启知识之旅</span></a>
            </div>
            <div class="blank10">
            </div>
        </div>
        <? } ?>        <div class="boxthree2">
            <div class="boxtop">
                <div id="linkMore" style="font-size: 12px; font-weight: normal;" class="boxtop1_more">
                </div>
                不会做啊不会做(>_<)</div>
            <div id="searchresult" class="boxthree2down">
               <div class="boxdown">          
                    <div class = "button_red"><a id="wanna_share" class ="link_red" href = "<?=SITE_URL?>?question/add.html">我要提问</a></div>
               </div>
            </div>
        </div>
        <div class="blank10">
        </div>
        <div class="boxthree2">
            <div class="boxtop">
                <div id="linkMore" style="font-size: 12px; font-weight: normal;" class="boxtop1_more">
                    <a target="_blank" href="<?=SITE_URL?>?note/list.html">更多&gt;&gt;</a></div>公告
            	</div>
            <div id="searchresult" class="boxthree2down">
                <ul class="blue">
                <? $notelist=$this->fromcache('notelist'); ?>                    
<? if(is_array($notelist)) { foreach($notelist as $note) { ?>
                    <li>·<a <? if($note['url']) { ?>href="<?=$note['url']?>" target="_blank" <? } else { ?> href="<?=SITE_URL?>?note/view/<?=$note['id']?>.html" <? } ?> ><strong><?=$note['title']?></strong></a></li>
                    
<? } } ?>
                </ul>
            </div>
        </div>
        <div class="blank10">
        </div>
        <div class="boxthree2">
            <div class="boxtop">热点关键词</div>
            <div class="boxthree2down blue" id="divHotKey">
                
<? if(is_array($wordslist)) { foreach($wordslist as $hotword) { ?>
                <a <? if($hotword['qid']) { ?>href="<?=SITE_URL?>?q-<?=$hotword['qid']?>.html" <? } else { ?>href="<?=SITE_URL?>?question/search/3/<?=$hotword['w']?>.html"<? } ?>><?=$hotword['w']?></a>
                
<? } } ?>
            </div>
        </div>
        <div class="blank10">
        </div>
        <div class="boxthree2">
            <div class="boxtop">名师讲堂</div>
            <div class="boxthree3down">
            <? $famouslist=$this->fromcache('famouslist'); ?>                
<? if(is_array($famouslist)) { foreach($famouslist as $famous) { ?>
                <div style class="boxthree3down0">
                    <div class="boxthree3down0right">
                        <h3 class="blue"><a href="<?=SITE_URL?>?u-<?=$famous['uid']?>.html" target="_blank"><?=$famous['username']?></a></h3>
精彩解答：<span class="blake1"><a href="<?=SITE_URL?>?q-<?=$famous['qid']?>.html" target="_blank"><?=$famous['title']?></a></span>
                    </div>
                    <a href="<?=SITE_URL?>?u-<?=$famous['uid']?>.html"><img src="<?=$famous['avatar']?>" width="51" height="51"></a>
                </div>
                
<? } } ?>
            </div>
        </div>
        <div class="blank10">
        </div>
        <div class="boxthree4">
            <div class="boxtop2">
                <div class="boxtop2B" id="zbf021" onmouseover="show_tabz(21)">达人飙升榜</div>
                <div class="boxtop2x"></div>
                <div class="boxtop2A" id="zbf022" onmouseover="show_tabz(22)">总积分榜</div>
            </div>
            <div style="display: none;" id="zbli021">
                <table class="blue" border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td width="11%"></td>
                        <td width="68%"><strong>用户名</strong></td>
                        <td style="text-align: right;" width="21%"><strong>得分</strong></td>
                    </tr>
                    <? $weekuserlist=$this->fromcache('weekuserlist'); ?>                    
<? if(is_array($weekuserlist)) { foreach($weekuserlist as $index => $weekuser) { ++$index; ?>                    <tr>
                        <td><div class="boxthree4paihang1"><?=$index?></div></td>
                        <td><a  href="<?=SITE_URL?>?u-<?=$weekuser['uid']?>.html"  target="_blank"><?=$weekuser['username']?></a><a></a></td>
                        <td class="b888" style="text-align: right;"><?=$weekuser['credit1']?></td>
                    </tr>
                    
<? } } ?>
                </table>
                <div style="text-align: right; padding-right: 5px; line-height: 22px;"><a target="_blank" href="<?=SITE_URL?>?us-1.html">更多&gt;&gt;</a></div>
            </div>
            <div id="zbli022" style="display: block;">
                <table class="blue" border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td width="11%">　</td>
                        <td width="68%"><strong>用户名</strong></td>
                        <td style="text-align: right;" width="21%"><strong>得分</strong></td>
                    </tr>
                    <? $alluserlist=$this->fromcache('alluserlist'); ?>                    
<? if(is_array($alluserlist)) { foreach($alluserlist as $index => $alluser) { ++$index; ?>                    <tr>
                        <td><div class="boxthree4paihang1"><?=$index?></div></td>
                        <td><a  href="<?=SITE_URL?>?u-<?=$alluser['uid']?>.html"  target="_blank"><?=$alluser['username']?></a><a></a></td>
                        <td class="b888" style="text-align: right;"><?=$alluser['credit1']?></td>
                    </tr>
                    
<? } } ?>
                </table>
                <div style="text-align: right; padding-right: 5px; line-height: 22px;"><a target="_blank" href="<?=SITE_URL?>?us-0.html">更多&gt;&gt;</a></div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
 //精彩推荐
 $("li[id^='recommend']").bind("mouseover", function(){
 	var id=$(this).attr('id') ;
$("a[id^='recommend']").hide();
 	$('#'+id+'img').show();
}); 

//积分达人切换
function show_tabz(num){
$("div[id^='zbf0']").attr('class','boxtop2B'); 
$("div[id^='zbli0']").hide();
$('#zbf0'+num).attr('class','boxtop2A'); 
$('#zbli0'+num).show(); 
}
</script>
<? include template('footer'); ?>
